package com.lyf.scm.plan.insfrastructure.db.mapper;

import com.lyf.scm.plan.api.dto.SalePlanDirectlyDifferinInfoDTO;
import com.lyf.scm.plan.api.dto.SalesPlanDirectlyAccuracyInfoDTO;
import com.lyf.scm.plan.insfrastructure.db.dataobject.SalesPlanSelectDO;
import com.lyf.scm.plan.insfrastructure.db.dataobject.bigdata.DirectlyAccuracyInDO;
import com.lyf.scm.plan.insfrastructure.db.dataobject.bigdata.DirectlyAccuracyUpDO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 直营预测计划_销售计划准确率
 *
 * @author wangchlei
 * @date 2020/08/13
 */
public interface SalesPlanDirectlyAccuracyMapper {
    /**
     * 非分页查询
     *
     * @param salesPlanSelectDO
     * @return {@link List<SalesPlanDirectlyAccuracyInfoDTO>}
     **/
    List<SalesPlanDirectlyAccuracyInfoDTO> listByCycles(SalesPlanSelectDO salesPlanSelectDO);

    List<SalesPlanDirectlyAccuracyInfoDTO> listEChartsDataByCycles(SalesPlanSelectDO salesPlanSelectDO);

    /**
     * 大数据批量新增
     *
     * @param directlyAccuracyInDOs
     * @return void
     **/
    void batchInsert(List<DirectlyAccuracyInDO> directlyAccuracyInDOs);

    void batchDeleteByStartDate(@Param("storeCode") String storeCode, @Param("startDate") Date startDate);

    List<DirectlyAccuracyUpDO> listUpByStoreAndDate(@Param("storeCode") String storeCode, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    void rmByIds(List<Long> ids);

    void upByIds(List<DirectlyAccuracyUpDO> list);

    /**
     * 删除对应标识的数据
     *
     * @param opSign
     */
    void delete(@Param("opSign") String opSign);

    void deleteByOpSign(String opSign);
}
